package com.mywork.service;

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletResponse;

public class MyJSONUtil {
	public static PrintWriter getJSONprintWriter(HttpServletResponse response) {
		PrintWriter out=null;
		try {
			out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(),"utf-8"));
		} catch (UnsupportedEncodingException e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		} catch (IOException e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}
		return out;
	}
}
